import java.util.Scanner;
import java.lang.Math;

public class Array_1_6_07 {
    public static void main(String[] args) {
        int n;
        int[] x=new int[10000],difference=new int[10000];
        Scanner input=new Scanner(System.in);
        n=input.nextInt();
        for (int i = 1; i <= n; i++) {
            x[i]=input.nextInt();
        }
        for (int i = 1; i <n ; i++) {
            difference[i]=Math.abs(x[i+1]-x[i]);
        }
        qsort(difference,1,n);
        int flag=0;
        for (int i = 2; i <=n ; i++) {
            if(difference[i]-difference[i-1]!=1){
                flag=1;
                System.out.println("Not jolly");
                break;
            }
        }
        if(flag==0)
            System.out.println("Jolly");
    }
    public static void qsort(int[] difference,int s,int e){
        if(s>=e)
            return;
        int temp;
        int i=s,j=e;
        int k=difference[s];
        while (i!=j){
            while (i<j&&difference[j]>=k)
                j--;
            temp=difference[i];
            difference[i]=difference[j];
            difference[j]=temp;
            while (i<j&&difference[i]<=k)
                i++;
            temp=difference[i];
            difference[i]=difference[j];
            difference[j]=temp;
        }
        qsort(difference,s,i-1);
        qsort(difference,i+1,e);
    }
}